import Vue from 'vue'
import App from './App.vue'
import store from '@/store'
import router from '@/router'
import './router/permission' // 全局路由拦截
// css
import 'normalize.css/normalize.css' // CSS 初始化
import '@/styles/index.scss' // 全局 css
// svg icons
import 'virtual:svg-icons-register'
import SvgIcon from '@/components/SvgIcon/index.vue'
Vue.component('svg-icon', SvgIcon)
// 注册全局过滤器
import * as filters from '@/utils/filters.js'
Object.keys(filters).forEach((key) => {
  Vue.filter(key, filters[key])
})
// 自定义指令
import './utils/directive/index'
// element-ui
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(Element)

Vue.config.productionTip = false

new Vue({
  store,
  router,
  render: (h) => h(App)
}).$mount('#app')
